
def autodiscover():
    """
    Auto-discover INSTALLED_APPS static.py modules and fail silently when 
    not present. This forces an import on them to register any static bits they
    may want.
    """
    import imp
    from django.conf import settings
    for app in settings.INSTALLED_APPS:
        try:
            imp.find_module("static", __import__(app, {}, {}, [app.split(".")[-1]]).__path__)
        except ImportError:
            # there is no app static.py, skip it
            continue
        __import__("%s.static" % app)